class InstantiationModelAwarePointcutAdvisorImpl extends java.lang.Object implements InstantiationModelAwarePointcutAdvisor, AspectJPrecedenceInformation, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
private class |
InstantiationModelAwarePointcutAdvisorImpl.PerTargetInstantiationModelPointcut
Pointcut implementation that changes its behaviour when the advice is instantiated.
|
Modifier and Type | Field and Description |
---|---|
private MetadataAwareAspectInstanceFactory |
aspectInstanceFactory |
private java.lang.reflect.Method |
aspectJAdviceMethod |
private AspectJAdvisorFactory |
aspectJAdvisorFactory |
private java.lang.String |
aspectName |
private int |
declarationOrder |
private AspectJExpressionPointcut |
declaredPointcut |
private java.lang.Class<?> |
declaringClass |
private Advice |
instantiatedAdvice |
private java.lang.Boolean |
isAfterAdvice |
private java.lang.Boolean |
isBeforeAdvice |
private boolean |
lazy |
private java.lang.String |
methodName |
private java.lang.Class<?>[] |
parameterTypes |
private Pointcut |
pointcut |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
InstantiationModelAwarePointcutAdvisorImpl(AspectJExpressionPointcut declaredPointcut,
java.lang.reflect.Method aspectJAdviceMethod,
AspectJAdvisorFactory aspectJAdvisorFactory,
MetadataAwareAspectInstanceFactory aspectInstanceFactory,
int declarationOrder,
java.lang.String aspectName) |
Modifier and Type | Method and Description |
---|---|
private void |
determineAdviceType()
Duplicates some logic from getAdvice, but importantly does not force
creation of the advice.
|
Advice |
getAdvice()
Lazily instantiate advice if necessary.
|
MetadataAwareAspectInstanceFactory |
getAspectInstanceFactory() |
AspectMetadata |
getAspectMetadata()
Return the AspectJ AspectMetadata for this advisor.
|
java.lang.String |
getAspectName()
The name of the aspect (bean) in which the advice was declared.
|
int |
getDeclarationOrder()
The declaration order of the advice member within the aspect.
|
AspectJExpressionPointcut |
getDeclaredPointcut() |
int |
getOrder()
Get the order value of this object.
|
Pointcut |
getPointcut()
The pointcut for Spring AOP to use.
|
private Advice |
instantiateAdvice(AspectJExpressionPointcut pcut) |
boolean |
isAdviceInstantiated()
Return whether this advisor has already instantiated its advice.
|
boolean |
isAfterAdvice()
Return whether this is an after advice.
|
boolean |
isBeforeAdvice()
Return whether this is a before advice.
|
boolean |
isLazy()
Return whether this advisor is lazily initializing its underlying advice.
|
boolean |
isPerInstance()
This is only of interest for Spring AOP: AspectJ instantiation semantics
are much richer.
|
private void |
readObject(java.io.ObjectInputStream inputStream) |
java.lang.String |
toString() |
private final AspectJExpressionPointcut declaredPointcut
private final java.lang.Class<?> declaringClass
private final java.lang.String methodName
private final java.lang.Class<?>[] parameterTypes
private transient java.lang.reflect.Method aspectJAdviceMethod
private final AspectJAdvisorFactory aspectJAdvisorFactory
private final MetadataAwareAspectInstanceFactory aspectInstanceFactory
private final int declarationOrder
private final java.lang.String aspectName
private final Pointcut pointcut
private final boolean lazy
private Advice instantiatedAdvice
private java.lang.Boolean isBeforeAdvice
private java.lang.Boolean isAfterAdvice
public InstantiationModelAwarePointcutAdvisorImpl(AspectJExpressionPointcut declaredPointcut, java.lang.reflect.Method aspectJAdviceMethod, AspectJAdvisorFactory aspectJAdvisorFactory, MetadataAwareAspectInstanceFactory aspectInstanceFactory, int declarationOrder, java.lang.String aspectName)
public Pointcut getPointcut()
getPointcut
in interface PointcutAdvisor
public boolean isPerInstance()
true
means here is that the aspect is not a SINGLETON.isPerInstance
in interface Advisor
public AspectMetadata getAspectMetadata()
public Advice getAdvice()
getAdvice
in interface Advisor
MethodInterceptor
,
BeforeAdvice
,
ThrowsAdvice
,
AfterReturningAdvice
public boolean isLazy()
InstantiationModelAwarePointcutAdvisor
isLazy
in interface InstantiationModelAwarePointcutAdvisor
public boolean isAdviceInstantiated()
InstantiationModelAwarePointcutAdvisor
isAdviceInstantiated
in interface InstantiationModelAwarePointcutAdvisor
private Advice instantiateAdvice(AspectJExpressionPointcut pcut)
public MetadataAwareAspectInstanceFactory getAspectInstanceFactory()
public AspectJExpressionPointcut getDeclaredPointcut()
public int getOrder()
Ordered
Higher values are interpreted as lower priority. As a consequence,
the object with the lowest value has the highest priority (somewhat
analogous to Servlet load-on-startup
values).
Same order values will result in arbitrary sort positions for the affected objects.
getOrder
in interface Ordered
Ordered.HIGHEST_PRECEDENCE
,
Ordered.LOWEST_PRECEDENCE
public java.lang.String getAspectName()
AspectJPrecedenceInformation
getAspectName
in interface AspectJPrecedenceInformation
public int getDeclarationOrder()
AspectJPrecedenceInformation
getDeclarationOrder
in interface AspectJPrecedenceInformation
public boolean isBeforeAdvice()
AspectJPrecedenceInformation
isBeforeAdvice
in interface AspectJPrecedenceInformation
public boolean isAfterAdvice()
AspectJPrecedenceInformation
isAfterAdvice
in interface AspectJPrecedenceInformation
private void determineAdviceType()
public java.lang.String toString()
toString
in class java.lang.Object
private void readObject(java.io.ObjectInputStream inputStream) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException